#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    int multiply(int A, int B) {
        if (B == 1)
            return A;
        else
            return A + multiply(A, B - 1);
    }
};